<template lang="html">
  <div class="stores-container">
    <div class="stores-top">
      <a href="#">
        <img src="http://localhost:3000/image/find/store/goods7.png" alt="">
      </a>
    </div>
    <div class="mid-nav">
      <ul>
        <li>
          <a href="#">
            <img src="http://localhost:3000/image/find/store/logo1.png" alt="">
            <p>器材</p>
          </a>
        </li>
        <li>
          <a href="#">
            <img src="http://localhost:3000/image/find/store/logo2.png" alt="">
            <p>鞋服</p>
          </a>
        </li>
        <li>
          <a href="#">
            <img src="http://localhost:3000/image/find/store/logo3.png" alt="">
            <p>达人推荐</p>
          </a>
        </li>
      </ul>
    </div>
    <div class="hot-goods">
      <p>爆款推荐</p>
      <div class="goods-container" v-for="(item,index) in goodsArr" :key="index">
        <a href="#">
          <img :src="item.pic" alt="">
          <p class="goods-title">{{ item.title }}</p>
          <p class="goods-price">¥{{ item.price }}</p>
        </a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name:'Stores',
  data () {
    return {
      goodsArr: []
    }
  },
  mounted() {
    this.$axios.get(this.HOST + '/burning/store')
    .then(res => {
      this.goodsArr = res.data
    })
    .catch(error => {
      console.log(error)
    })
  }
}
</script>

<style lang="less" scoped>
.stores-container{
  height: 100%;
  .stores-top{
    width: 100%;
    height: 175/50rem;
    img{
      height: 100%;
      width: 100%;
    }
  }
  .mid-nav{
    width: 100%;
    font-size: 15px;
    text-align: center;
    margin-top: 10px;
    margin-bottom: 10px;
    ul{
      width: 100%;
      display:flex;
      li{
        flex-grow: 1;

        p{
          margin-top: 10px;
          color: #333;
        }
      }
    }
  }
  .hot-goods{
    box-sizing: border-box;
    padding: 0 10px;
    margin-bottom: 60px;
    height: (24+174*2)/50rem;
    p{
      font-size: 18/50rem;
    }
    .goods-container{
      width: 30%;
      float: left;
      margin-right:15px;
      margin-bottom: 10px;
      a{
        display:block;
        width: 100%;
        height: 100%;
        color: #333;
        img{
          width: 100%;
          height: 110.24/50rem;
        }
        .goods-title{
          width: 100%;
          font-size: 12px;
        }
        .goods-price{
          font-size: 14px;
        }
      }
    }
    .goods-container:nth-child(4){
      margin-right: 0;
    }
    .goods-container:nth-child(7){
      margin-right: 0;
    }
  }
}
</style>
